<template>
	<div v-show="showPage">
		<div style="border-bottom: 1px solid #ddd;">
			<h3>附加信息</h3>
		</div>
		<el-row style="margin-top: 10px;">
			<el-col :span="8" class="field-label">包名</el-col>
			<el-col :span="16">
				<el-input v-model="packageName" size="mini"></el-input>
			</el-col>
		</el-row>
		<el-row style="margin-top: 10px;">
			<el-col :span="8" class="field-label">树表</el-col>
			<el-col :span="16">
				<el-checkbox v-model="treeTable" style="height: 24px;"></el-checkbox>
			</el-col>
		</el-row>
		<el-row style="margin-top: 10px;">
			<el-col :span="8" class="field-label">访问方式</el-col>
			<el-col :span="16">
				<el-select v-model="accessType" filterable placeholder="请选择" size="mini" clearable>
					<el-option v-for="item in accessTypeList" :key="item.value" :label="item.name"
						:value="item.value">
					</el-option>
				</el-select>
			</el-col>
		</el-row>
	</div>
</template>

<script>
	export default {
		name: "ModelExtraInfoPage",
		props: ["scope"],
		data() {
			return {
				showPage: false,
				packageName: "",
				treeTable:false,
				accessType:"mybatis",
				accessTypeList: [{
						"value": "mybatis",
						"name": "Mybatis"
					},
					{
						"value": "db",
						"name": "数据库"
					}
				]
			}
		},
		methods: {
			setVisible(visible) {
				this.showPage = visible;
			},
			getReturnData() {
				return {
					"packageName": this.packageName,
					"treeTable": this.treeTable,
					"accessType": this.accessType
				};
			},
			getPreviousPage() {
				return "modelBaseInfoPage";
			},
			getNextPage() {
				return "sqlPage";
			},
			isCompletedPage() {
				var modelType=this.scope["modelTypeSelectPage"]["modelType"];
				if("view"!=modelType){
					return true;
				}
				return false;
			}
		},
	}
</script>

<style>
</style>
